// The Vue build version to load with the `import` command (runtime-only or
// standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import MeiJing_Index from './pages/MeiJingSuiPai/index'
import MeiJing_Photo_Index from './pages/MeiJingSuiPai/Photo/index'
import MeiJing_Photo_Detail from './pages/MeiJingSuiPai/Photo/detail'
import MeiJing_Photo_Download from './pages/MeiJingSuiPai/Photo/download'
import MeiJing_Video_Index from './pages/MeiJingSuiPai/Video/index'
import MeiJing_Video_Detail from './pages/MeiJingSuiPai/Video/detail'
import MeiJing_Video_Download from './pages/MeiJingSuiPai/Video/download'
import JueJia_Index from './pages/JueJiaJingSe/index'
import JueJia_City from './pages/JueJiaJingSe/city'
import JueJia_Views from './pages/JueJiaJingSe/views'
import JueJia_Detail from './pages/JueJiaJingSe/detail'
import User_Index from './pages/User/index'
import User_Profile from './pages/User/profile'
import User_History from './pages/User/history'
import Link from './pages/link'
import Jump from './pages/jump'

import { AjaxPlugin, LoadingPlugin, ToastPlugin} from 'vux'
import VueLazyLoad from 'vue-lazyload'
import VueClipboard from 'vue-clipboard2'

Vue.use(VueRouter)
Vue.use(AjaxPlugin)
Vue.use(LoadingPlugin)
Vue.use(VueLazyLoad);
Vue.use(VueClipboard)
Vue.use(ToastPlugin)

Vue.prototype.$http.defaults.baseURL = "http://mjk.baidingyouji.com/api/";


const routes = [
    {
        path: '/',
        component: MeiJing_Index
    },
    // MeiJingSuiPai
    {
        name: 'MeiJing_index',
        path: '/MeiJingSuiPai',
        component: MeiJing_Index
    }, {
        name: 'photo',
        path: '/MeiJingSuiPai/photo',
        component: MeiJing_Photo_Index
    }, {
        name: 'photo_detail',
        path: '/MeiJingSuiPai/photo/detail',
        component: MeiJing_Photo_Detail
    }, {
        name: 'photo_download',
        path: '/MeiJingSuiPai/photo/download',
        component: MeiJing_Photo_Download
    }, {
        name: 'video',
        path: '/MeiJingSuiPai/video',
        component: MeiJing_Video_Index
    }, {
        name: 'video_detail',
        path: '/MeiJingSuiPai/video/detail',
        component: MeiJing_Video_Detail
    }, {
        name: 'video_download',
        path: '/MeiJingSuiPai/video/download',
        component: MeiJing_Video_Download
    },
    // JueJiaJingSe
    {
        name: 'juejia_index',
        path: '/JueJiaJingSe',
        component: JueJia_Index
    }, {
        name: 'juejia_city',
        path: '/JueJiaJingSe/city',
        component: JueJia_City
    }, {
        name: 'juejia_views',
        path: '/JueJiaJingSe/views',
        component: JueJia_Views
    }, {
        name: 'juejia_detail',
        path: '/JueJiaJingSe/detail',
        component: JueJia_Detail
    },
    // User
    {
        name: 'user_index',
        path: '/User',
        component: User_Index
    }, {
        path: '/User/profile',
        component: User_Profile
    }, {
        path: '/User/history',
        component: User_History
    },
    // other
    {
        name: 'link',
        path: '/Link',
        component: Link
    },
    {
        name: 'jump',
        path: '/Jump',
        component: Jump
    }
]

const router = new VueRouter({ routes });

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    router,
    render: h => h(App)
}).$mount('#app-box')
